﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:CimbalinoConverters="clr-namespace:Cimbalino.Phone.Toolkit.Converters;assembly=Cimbalino.Phone.Toolkit"
                    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                    xmlns:c4fControls="clr-namespace:Coding4Fun.Toolkit.Controls;assembly=Coding4Fun.Toolkit.Controls">

    <CimbalinoConverters:StringToUppercaseConverter x:Key="StringToUppercaseConverter" />
    <CimbalinoConverters:StringToVisibilityConverter x:Key="StringToVisibilityConverter" />
    <CimbalinoConverters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    <CimbalinoConverters:BooleanToBrushConverter x:Key="BooleanToBrushConverter" TrueValue="#FFA6C4CE" FalseValue="Transparent" />

    <DataTemplate x:Key="FollwItStreamDataTemplate">
        <Grid Margin="0,0,0,12">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="75" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            
            <Image Grid.Column="0" Margin="0,0,0,0"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Width="75" Height="75"
                   Source="{Binding Avatar}"
                   />
            
            <Grid Grid.Column="1" Margin="6,-8,0,0">
                <StackPanel Orientation="Vertical">
                    <TextBlock Name="StreamFriendName"
                               Text="{Binding Username}"
                               Style="{StaticResource PhoneTextTitle3Style}"
                               FontWeight="Bold"
                               Foreground="{StaticResource FollwItAccentBrush}"/>
                    <TextBlock Name="StreamMovieTitle"
                               Text="{Binding WatchedMovie.Title}"
                               Style="{StaticResource PhoneTextTitle3Style}"/>
                    <TextBlock Name="StreamMovieTitleDescr"
                               Text="latest watched movie"
                               Margin="12,-6,0,0"
                               Style="{StaticResource PhoneTextSmallStyle}"/>
                    <TextBlock Name="StreamTVShowSeriesName"
                               Text="{Binding WatchedEpisode.EpisodeName}"
                               Style="{StaticResource PhoneTextTitle3Style}"/>
                    <TextBlock Name="StreamTVShowSeriesNameDesc"
                               Text="latest watched tv show"
                               Margin="12,-6,0,0"
                               Style="{StaticResource PhoneTextSmallStyle}"/>
                </StackPanel>
                <!--<TextBlock Text="{Binding Username, Converter={StaticResource StringToUppercaseConverter}}"
                       FontWeight="Bold"
                       FontSize="28"
                       />-->
            </Grid>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Name="SeriesDataTemplate">
        <Grid Margin="0,0,0,12">
            <TextBlock Text="{Binding SeriesName}" />
        </Grid>
    </DataTemplate>

    <DataTemplate x:Name="MoviesDataTemplate">
        <Grid Margin="0,0,0,12">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="125" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <c4fControls:SuperImage x:Name="MovieCover"
                                    Grid.Column="0"
                                    PlaceholderImageSource="/Assets/NoCover_182.png"
                                    PlaceholderImageStretch="Fill"
                                    Source="{Binding CoverMed}"
                                    Stretch="Fill"
                                    Width="125"
                                    />
            <Grid Grid.Column="1" Margin="6,-8,0,0">
                <StackPanel Orientation="Vertical">
                    <TextBlock Name="MovieTitle"
                               FontWeight="Bold"
                               Foreground="{StaticResource FollwItAccentBrush}"
                               Style="{StaticResource PhoneTextTitle3Style}"
                               Text="{Binding Title}"/>
                    <TextBlock Name="MovieYear"
                               Text="{Binding Year}"
                               Style="{StaticResource PhoneTextTitle3Style}"/>
                    <TextBlock Name="MovieYearDescr"
                               Text="year"
                               Margin="12,-6,0,0"
                               Style="{StaticResource PhoneTextSmallStyle}"/>                    
                </StackPanel>
            </Grid>
        </Grid>
    </DataTemplate>

</ResourceDictionary>